Step 2 - Roslyn Code Generator
Generation of Biz, API Client, Controllers and View Model files using Roslyn Code Generator
Open Program class and provide path of your WSL project as InputPath in args[0] and OutputPath for generated code.
namespace CodeMigration // Note: actual namespace depends on the project name.
{
internal class Program
{
static void Main(string[] args)
{
args = new string[6];
args[0] = @"D:\CWF\Repos\IRRBB4\MAIN\Web\Business\IRRBB4WSL\"; //Input Path of SVC to be Migrated
args[1] = @"D:\CWF\RoslynGeneratedCode\IRRBB4\MigratedSVC\"; //Output Path for Biz Files
ProjLvlMigration projLvlMig = new ProjLvlMigration();
projLvlMig.ProjLvlSvcCodeMig(args[0], args[1]);
args[2] = @"D:\CWF\RoslynGeneratedCode\IRRBB4\GeneratedControllers\"; //Output Path for Controllers
args[3] = @"D:\CWF\RoslynGeneratedCode\IRRBB4\GeneratedCustomViewModel\"; //Output Path for View Model
projLvlMig.ProjLvlControllerGeneration(args[0], args[2], args[3]);
args[4] = @"D:\CWF\RoslynGeneratedCode\IRRBB4\GeneratedAPIClients\"; //Output Path for API Clients
projLvlMig.ProjLvlAPIClientGeneration(args[0], args[4]);
}
}
}
Note: You can provide input path folder by folder to avoid migration of Auth related services.
Open CommonConst class modify these keys as per your requirement.
# CommonCost Details Example 1 PrefixForApiClientNamespace Namespace of Presentation layer project PL 2 ReqVmNamespace Namespace of Generated custom view model DTO 3 ReqBizNamespace Namespace of Generated Biz files Com.Surya.Biz 4 ReqControllerNamespace Namespace of Generated controller files Com.Surya.WebAPI Run the Project